using System;
using System.Collections.Generic;
using System.Text;

namespace Calc.Parser
{
	public enum LexerTokenType
	{
		Constant,
		RightParenthesis,
		LeftParenthesis,
		Operator,
		Comma,
		String,
		End,
		Invalid
	}

	public class LexerToken
	{
		protected string _token;
		protected LexerTokenType _tokenType;
		protected int _index;
		protected string _errorMessage;

		public LexerToken(char token, LexerTokenType lexerTokenType, int index) : this (new string(token, 1), lexerTokenType, index)
		{

		}

		public LexerToken(string token, LexerTokenType lexerTokenType, int index)
		{
			_token = token;

			_tokenType = lexerTokenType;

			_index = index;
		}

		public LexerToken(string token, int index)
		{
			_token = token;

			_tokenType = LexerTokenType.Invalid;

			_index = index;
		}

		public string Token
		{
			get { return _token; }
		}

		public LexerTokenType TokenType
		{
			get { return _tokenType; }
		}

		public int Index
		{
			get { return _index; }
		}
	}
}
